package com.cheng.dao.takedelivery;

import java.util.Date;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import com.cheng.domain.takedelivery.Promotion;

public interface PromotionDao extends JpaRepository<Promotion, Integer> {

	@Query("update Promotion set status = '2' where status = '1' and endDate < ?")
	@Modifying
	void updatePromotion(Date date);

}
